package com.foo.demo.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.Random;

/**
 * Created by Zetas on 2016/11/24.
 */
@Controller
public class DemoController {

    @RequestMapping("/index.htm")
    public ModelAndView index() {

        ModelAndView mav = new ModelAndView();
        mav.addObject("msg", "lucky number: "+new Random().nextInt(10000));

        return mav;
    }

}
